//
//  Categorys.m
//  NewProject
//
//  Created by _author on 15-12-29.
//  Copyright (c) _companyname. All rights reserved.
//  

/*
	
*/


#import "Categorys.h"
#import "DTApiBaseBean.h"


@implementation Categorys


-(id)initWithDictionary:(NSDictionary*)dict
{
    if (self = [super init])
    {
		DTAPI_DICT_ASSIGN_STRING(cat_id, @"");
		DTAPI_DICT_ASSIGN_STRING(cat_name, @"");
		DTAPI_DICT_ASSIGN_STRING(parent_id, @"");
		DTAPI_DICT_ASSIGN_STRING(sort_order, @"");
		DTAPI_DICT_ASSIGN_STRING(show_in_nav, @"");
		DTAPI_DICT_ASSIGN_STRING(sort_order, @"");
        DTAPI_DICT_ASSIGN_STRING(is_show, @"");
        DTAPI_DICT_ASSIGN_STRING(cat_ico, @"");
        
        self.sons = [DTApiBaseBean arrayForKey:@"sons" inDictionary:dict withClass:[Categorys class]];
        self.height = 195.0;
     
    }
    
    return self;
}

-(NSDictionary*)dictionaryValue
{
    NSMutableDictionary *md = [NSMutableDictionary dictionary];
    
	DTAPI_DICT_EXPORT_BASICTYPE(cat_id);
	DTAPI_DICT_EXPORT_BASICTYPE(cat_name);
	DTAPI_DICT_EXPORT_BASICTYPE(parent_id);
	DTAPI_DICT_EXPORT_BASICTYPE(sort_order);
	DTAPI_DICT_EXPORT_BASICTYPE(show_in_nav);
	DTAPI_DICT_EXPORT_BASICTYPE(is_show);
    DTAPI_DICT_EXPORT_BASICTYPE(cat_ico);
    DTAPI_DICT_EXPORT_ARRAY_BEAN(sons);
    return md;
}
@end
